####################################
# Soviet Union 25000 - 25999 by Lothos
####################################
# Invasion Flags
#	SOVInvadeGER			= Prepare to Invade Germany
#	SOVInvadePOL			= Soviets prepare to invade Poland
#	SOVInvadeBaltic			= Soviets invade Baltic States
#	SOVInvadeFIN			= Soviets invade Finland
#	SOVDefendFIN			= Attack the fins if they go to far while atwar with Germany

# Defensive Flags
#	SOVDefensePrepareGER	= Prepare defenses against Germany
#	SOVHandicapGER			= Handicap File has been loaded against Germany

# Unit building AI
#	SOVBuildStandard		= Standard Building of units 
#	SOVBuildLand			= Priority Building land units
#	SOVBuildLandPanic		= Priority Building land units
#	SOVUpgrading			= Soviets are concentrating on upgrading

################
# Soviets remove their Finland prep war AI
#############################################
event = {
	id = 25000
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		local_flag = SOVInvadeFIN
		OR = {
			war = { country = FIN country = SOV }
			event = 2622
			event = 2628
			AND = {
				owned = { province = 145 data = SOV }
				owned = { province = 146 data = SOV }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 29 month = september year = 1939 }
	offset = 1
	deathdate = { day = 29 month = january year = 1940 }

	action_a = {
		command = { type = ai which = "switch/SOV_Finland_Release.ai" }
		command = { type = local_clrflag which = SOVInvadeFIN }
	}
}
################
# Soviets Winter War AI
#############################################
event = {
	id = 25001
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		NOT = { war = { country = GER country = SOV } }
		OR = {
			flag = MolotovPact  # 1939 Grand Campaign
			event = 2013  # Molotov Pact Historical
			event = 2015  # Molotov Pact Alliance
			event = 2016  # Molotov Pact Limited
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 25 month = august year = 1939 }
	offset = 1
	deathdate = { day = 29 month = january year = 1940 }

	action_a = {
		command = { type = ai which = "switch/SOV_Finland.ai" }
		command = { type = ai which = "Air_Ground.ai" }
		command = { type = local_setflag which = SOVInvadeFIN }
		command = { type = local_clrflag which = SOVDefensePrepareGER }
	}
}
################
# Soviet declare war on Germany AI
#############################################
event = {
	id = 25002
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		NOT = { non_aggression = { country = GER country = SOV } }
		OR = {
			local_flag = SOVInvadeGER
			war = { country = GER country = SOV }
			AND = {
				random = 5
				NOT = { war = { country = GER country = SOV } }
				year = 1942
				atwar = GER
			}
			AND = {
				random = 15
				NOT = { flag = MolotovPact }
				NOT = { event = 2013 } # Molotov Pact Historical
				NOT = { event = 2015 } # Molotov Pact Alliance
				NOT = { event = 2016 } # Molotov Pact Limited
				OR = {
					control = { province = 485 data = GER } # Warsaw
					war = { country = GER country = POL }
					war = { country = GER country = FRA }
					war = { country = GER country = ENG }
					puppet = { country = POL country = GER }
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 12
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Germany.ai" }
		command = { type = ai which = "Air_Ground.ai" }
		command = { type = sleepevent which = 25001 }
		command = { type = sleepevent which = 25003 }
		command = { type = local_setflag which = SOVInvadeGER }
		command = { type = local_clrflag which = SOVInvadeFIN }
	}
}
################
# Soviet Load German war AI
#############################################
event = {
	id = 25003
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		war = { country = GER country = SOV }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Germany.ai" }
		command = { type = ai which = "switch/SOV_Ger_FIN_Defend.ai" }
		command = { type = local_clrflag which = SOVDefendFIN }
		command = { type = ai which = "Air_Ground.ai" }
		command = { type = sleepevent which = 25001 }
		command = { type = sleepevent which = 25002 }
	}
}
################
# Soviet declare war on Japan AI
#############################################
event = {
	id = 25004
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		random = 5
		NOT = { non_aggression = { country = JAP country = SOV } }
		OR = {
			NOT = { control = { province = 300 data = GER } } # Berlin
			ispuppet = GER
		}
		NOT = { war = { country = GER country = SOV } }
		OR = {
			war = { country = JAP country = USA }
			war = { country = JAP country = CHC }
			war = { country = JAP country = CHI }
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1942}
	offset = 12
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Japan.ai" }
		command = { type = ai which = "Air_GRound.ai" }
		command = { type = war which = JAP }
	}
}
################
# Soviet increase troop production AI
#############################################
event = {
	id = 25005
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = max_factor_100 }
		atwar = no
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = october year = 1938 }

	action_a = {
		command = { type = ai which = "switch/max_factor_100.ai" }
		command = { type = local_clrflag which = max_factor_005 }
		command = { type = local_clrflag which = max_factor_025 }
		command = { type = local_clrflag which = max_factor_085 }
		command = { type = local_setflag which = max_factor_100 }
	}
}

event = {
	id = 25050
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = max_factor_085 }
		atwar = no
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = november year = 1938 }
	offset = 1
	deathdate = { day = 29 month = may year = 1939 }

	action_a = {
		command = { type = ai which = "switch/max_factor_085.ai" }
		command = { type = local_clrflag which = max_factor_005 }
		command = { type = local_clrflag which = max_factor_025 }
		command = { type = local_setflag which = max_factor_085 }
		command = { type = local_clrflag which = max_factor_100 }
	}
}

event = {
	id = 25043
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = max_factor_025 }
		OR = {
			AND = {
				year = 1939
				month = 5 # june
			}
			year = 1940
			atwar = yes
		}
		OR = {
			AND = {
				NOT = { war = { country = GER country = SOV } }
				OR = { 
					NOT = { year = 1941 }
					year = 1942
				}
			}
			year = 1943
		}
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/max_factor_025.ai" }
		command = { type = local_clrflag which = max_factor_005 }
		command = { type = local_setflag which = max_factor_025 }
		command = { type = local_clrflag which = max_factor_085 }
		command = { type = local_clrflag which = max_factor_100 }
	}
}

event = {
	id = 25044
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = max_factor_005 }
		OR = {
			war = { country = GER country = SOV }
			AND = {
				year = 1941
				NOT = { year = 1942 }
			}
		}
		NOT = { year = 1943 } # Front is not stabilized, yet
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/max_factor_005.ai" }
		command = { type = local_setflag which = max_factor_005 }
		command = { type = local_clrflag which = max_factor_025 }
		command = { type = local_clrflag which = max_factor_085 }
		command = { type = local_clrflag which = max_factor_100 }
	}
}

################
# Soviet Union stops hounding Finland for border lands
#############################################
event = {
	id = 25006
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		NOT = { war = { country = FIN country = SOV } }
		OR = {
			event = 2622
			event = 2628
			AND = {
				owned = { province = 145 data = SOV }
				owned = { province = 146 data = SOV }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1939 }
	offset = 12
	deathdate = { day = 29 month = december year = 1940 }

	action_a = {
		command = { type = ai which = "switch/SOV_Fin_Demands.ai" }
		command = { type = local_clrflag which = SOVInvadeFIN }
		command = { type = sleepevent which = 25000 }
	}
}
################
# Soviet Winter War against Germany
#############################################
event = {
	id = 25007
	random = no 
	country = SOV

	trigger = {
		ai = yes
		war = { country = GER country = SOV }
		OR = {
			month = 11 # December
			AND = {
				month = 0 # January
				NOT = { month = 2 } # March
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 4
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Winter.ai" }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
################
# Soviets go back on defense
#############################################
event = {
	id = 25008
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		event = 25007
		war = { country = GER country = SOV }
		month = 3 # April
		NOT = { month = 7 } # August
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 4
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Germany_Second_Year.ai" }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
################
# Soviets go on the attack permanately
#############################################
event = {
	id = 25009
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		event = 25008
		war = { country = GER country = SOV }
		OR = {
			month = 11 # December
			AND = {
				month = 0 # January
				NOT = { month = 2 } # March
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 4
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Winter.ai" }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
################
# Soviets Bitter Peace AI
#############################################
event = {
	id = 25010
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		OR = {
			event = 2625 # Bitter Peace
			event = 2646 # Bitter Peace, Japan Axis
		}
		NOT = { war = { country = GER country = SOV } }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 4
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Bitter_Peace.ai" }
		command = { type = ai which = "Air_Ground.ai" }
		command = { type = sleepevent which = 25002 }  # Soviet DOW of Germany AI event
	}
}
################
# Soviets Monitor Baltic States
#############################################
event = {
	id = 25011
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		OR = {
			AND = {
				under_attack = EST
				war = { country = GER country = EST }
			}
			AND = {
				under_attack = LAT
				war = { country = GER country = LAT }
			}
			AND = {
				under_attack = LIT
				war = { country = GER country = LIT }
			}
			AND = {
				under_attack = TUR
				war = { country = GER country = TUR }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = local_setflag which = SOVInvadeGER }
	}
}

################
# Soviets match German border buildup
#############################################
event = {
	id = 25012
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { war = { country = GER country = SOV } }
		NOT = { war = { country = FIN country = SOV } }
		NOT = {	lost_national = { country = SOV value = 2 } }
		NOT = { local_flag = SOVDefensePrepareGER }
		NOT = { local_flag = SOVInvadeFIN }
		OR = {
			flag = MolotovPact # 1939 Grand Campaign
			event = 2018 #Eastern Poland given to the Soviets
		}
		OR = {
			garrison = { country = GER province = 488  type = land size = 8 area = no } # Zamosc
			garrison = { country = GER province = 489  type = land size = 8 area = no } # Przemyst
			garrison = { country = GER province = 487  type = land size = 8 area = no } # Lubin
			garrison = { country = GER province = 509  type = land size = 8 area = no } # Suwalki
			garrison = { country = GER province = 510  type = land size = 8 area = no } # Konigsberg
			garrison = { country = GER province = 206  type = land size = 8 area = no } # Memel
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = local_setflag which = SOVDefensePrepareGER }
		command = { type = ai which = "switch/SOV_Defense_GER_Border.ai" }
	}
}
################
# Soviets back down from German border buildup
#############################################
event = {
	id = 25013
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { war = { country = GER country = SOV } }
		NOT = { war = { country = FIN country = SOV } }
		NOT = {	lost_national = { country = SOV value = 2 } }
		local_flag = SOVDefensePrepareGER
		NOT = { local_flag = SOVInvadeFIN }

		NOT = {
			OR = {
				flag = MolotovPact # 1939 Grand Campaign
				event = 2018 #Eastern Poland given to the Soviets
			}
			OR = {
				garrison = { country = GER province = 488  type = land size = 8 area = no } # Zamosc
				garrison = { country = GER province = 489  type = land size = 8 area = no } # Przemyst
				garrison = { country = GER province = 487  type = land size = 8 area = no } # Lubin
				garrison = { country = GER province = 509  type = land size = 8 area = no } # Suwalki
				garrison = { country = GER province = 510  type = land size = 8 area = no } # Konigsberg
				garrison = { country = GER province = 206  type = land size = 8 area = no } # Memel
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = local_clrflag which = SOVDefensePrepareGER }
		command = { type = ai which = "switch/SOV_Defense_Standard.ai" }
	}
}

################
# Unit building AI
#	SOVBuildStandard		= Standard Building of units 
#	SOVBuildLand			= Priority Building land units
#	SOVBuildLandPanic		= Priority Building cheap land units
################
# Soviets loads Panic builds AI
#############################################
event = {
	id = 25014
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		OR = {
			oil = 50000
			control = { province = 1907 data = SOV } # Baku
		}
		NOT = { local_flag = sov_build_panic_1936 }
		OR = {
			AND = {
				manpower = 150
				NOT = { army = 25 }
			}
			AND = {
				manpower = 300
				NOT = { army = 50 }
			}
			AND = {
				manpower = 450
				NOT = { army = 75 }
			}
			AND = {
				manpower = 600
				NOT = { army = 100 }
			}
			AND = {
				manpower = 750
				NOT = { army = 125 }
			}
			AND = {
				manpower = 900
				NOT = { army = 150 }
			}
			AND = {
				manpower = 1050
				NOT = { army = 175 }
			}
			AND = {
				manpower = 1200
				NOT = { army = 200 }
			}
			AND = {
				manpower = 1350
				NOT = { army = 225 }
			}
			AND = {
				manpower = 1500
				NOT = { army = 250 }
			}
			AND = {
				manpower = 1650
				NOT = { army = 275 }
			}
			AND = {
				manpower = 1800
				NOT = { army = 300 }
			}
			AND = {
				manpower = 1950
				NOT = { army = 325 }
			}
			AND = {
				manpower = 2100
				NOT = { army = 350 }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_build_panic.ai" }
		command = { type = local_setflag which = sov_build_panic_1936 }
		command = { type = local_clrflag which = sov_build_land_1936 }
		command = { type = local_clrflag which = sov_build_standard_1936 }
		command = { type = local_clrflag which = sov_build_standard_1948 }
		command = { type = local_clrflag which = sov_build_bergsjaeger_1936 }
	}
}
################
# Soviets loads Land builds AI
#############################################
event = {
	id = 25015
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		OR = {
			oil = 50000
			control = { province = 1907 data = SOV } # Baku
		}
		NOT = { local_flag = sov_build_land_1936 }
		OR = {
			AND = {
				army = 25
				NOT = { manpower = 150 }
			}
			AND = {
				army = 50
				NOT = { manpower = 300 }
			}
			AND = {
				army = 75
				NOT = { manpower = 450 }
			}
			AND = {
				army = 100
				NOT = { manpower = 600 }
			}
			AND = {
				army = 125
				NOT = { manpower = 750 }
			}
			AND = {
				army = 150
				NOT = { manpower = 900 }
			}
			AND = {
				army = 175
				NOT = { manpower = 1050 }
			}
			AND = {
				army = 200
				NOT = { manpower = 1200 }
			}
			AND = {
				army = 225
				NOT = { manpower = 1350 }
			}
			AND = {
				army = 250
				NOT = { manpower = 1500 }
			}
			AND = {
				army = 275
				NOT = { manpower = 1650 }
			}
			AND = {
				army = 300
				NOT = { manpower = 1800 }
			}
			AND = {
				army = 325
				NOT = { manpower = 1950 }
			}
			AND = {
				army = 350
				NOT = { manpower = 2100 }
			}
			AND = {
				army = 375
				NOT = { manpower = 2250 }
			}
		}
		OR = {
			AND = {
				manpower = 100
				NOT = { army = 25 }
			}
			AND = {
				manpower = 200
				NOT = { army = 50 }
			}
			AND = {
				manpower = 300
				NOT = { army = 75 }
			}
			AND = {
				manpower = 400
				NOT = { army = 100 }
			}
			AND = {
				manpower = 500
				NOT = { army = 125 }
			}
			AND = {
				manpower = 600
				NOT = { army = 150 }
			}
			AND = {
				manpower = 700
				NOT = { army = 175 }
			}
			AND = {
				manpower = 800
				NOT = { army = 200 }
			}
			AND = {
				manpower = 900
				NOT = { army = 225 }
			}
			AND = {
				manpower = 1000
				NOT = { army = 250 }
			}
			AND = {
				manpower = 1100
				NOT = { army = 275 }
			}
			AND = {
				manpower = 1200
				NOT = { army = 300 }
			}
			AND = {
				manpower = 1300
				NOT = { army = 325 }
			}
			AND = {
				manpower = 1400
				NOT = { army = 350 }
			}
			AND = {
				manpower = 1400
				NOT = { army = 375 }
			}
			AND = {
				manpower = 1600
				NOT = { army = 400 }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_build_land.ai" }
		command = { type = local_clrflag which = sov_build_panic_1936 }
		command = { type = local_setflag which = sov_build_land_1936 }
		command = { type = local_clrflag which = sov_build_standard_1936 }
		command = { type = local_clrflag which = sov_build_standard_1948 }
		command = { type = local_clrflag which = sov_build_bergsjaeger_1936 }
	}
}
################
# Soviets loads Standard builds AI
#############################################
event = {
	id = 25016
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		OR = {
			oil = 50000
			control = { province = 1907 data = SOV } # Baku
		}
		NOT = { technology = 7210 } # 1948 Nuclear Sub
		NOT = { local_flag = sov_build_standard_1936 }
		OR = {
			AND = {
				army = 25
				NOT = { manpower = 100 }
			}
			AND = {
				army = 50
				NOT = { manpower = 200 }
			}
			AND = {
				army = 75
				NOT = { manpower = 300 }
			}
			AND = {
				army = 100
				NOT = { manpower = 400 }
			}
			AND = {
				army = 125
				NOT = { manpower = 500 }
			}
			AND = {
				army = 150
				NOT = { manpower = 600 }
			}
			AND = {
				army = 175
				NOT = { manpower = 700 }
			}
			AND = {
				army = 200
				NOT = { manpower = 800 }
			}
			AND = {
				army = 225
				NOT = { manpower = 900 }
			}
			AND = {
				army = 250
				NOT = { manpower = 1000 }
			}
			AND = {
				army = 275
				NOT = { manpower = 1100 }
			}
			AND = {
				army = 300
				NOT = { manpower = 1200 }
			}
			AND = {
				army = 325
				NOT = { manpower = 1300 }
			}
			AND = {
				army = 350
				NOT = { manpower = 1400 }
			}
			AND = {
				army = 375
				NOT = { manpower = 1500 }
			}
			army = 400
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_build_standard.ai" }
		command = { type = local_clrflag which = sov_build_panic_1936 }
		command = { type = local_clrflag which = sov_build_land_1936 }
		command = { type = local_setflag which = sov_build_standard_1936 }
		command = { type = local_clrflag which = sov_build_standard_1948 }
		command = { type = local_clrflag which = sov_build_bergsjaeger_1936 }
	}
}

event = {
	id = 25087
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		OR = {
			oil = 50000
			control = { province = 1907 data = SOV } # Baku
		}
		technology = 7210 # 1948 Nuclear Sub
		NOT = { local_flag = sov_build_standard_1948 }
		OR = {
			AND = {
				army = 25
				NOT = { manpower = 100 }
			}
			AND = {
				army = 50
				NOT = { manpower = 200 }
			}
			AND = {
				army = 75
				NOT = { manpower = 300 }
			}
			AND = {
				army = 100
				NOT = { manpower = 400 }
			}
			AND = {
				army = 125
				NOT = { manpower = 500 }
			}
			AND = {
				army = 150
				NOT = { manpower = 600 }
			}
			AND = {
				army = 175
				NOT = { manpower = 700 }
			}
			AND = {
				army = 200
				NOT = { manpower = 800 }
			}
			AND = {
				army = 225
				NOT = { manpower = 900 }
			}
			AND = {
				army = 250
				NOT = { manpower = 1000 }
			}
			AND = {
				army = 275
				NOT = { manpower = 1100 }
			}
			AND = {
				army = 300
				NOT = { manpower = 1200 }
			}
			AND = {
				army = 325
				NOT = { manpower = 1300 }
			}
			AND = {
				army = 350
				NOT = { manpower = 1400 }
			}
			AND = {
				army = 375
				NOT = { manpower = 1500 }
			}
			army = 400
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_build_standard_1948.ai" }
		command = { type = local_clrflag which = sov_build_panic_1936 }
		command = { type = local_clrflag which = sov_build_land_1936 }
		command = { type = local_clrflag which = sov_build_standard_1936 }
		command = { type = local_setflag which = sov_build_standard_1948 }
		command = { type = local_clrflag which = sov_build_bergsjaeger_1936 }
	}
}

event = {
	id = 25088
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { oil = 50000 }
		NOT = { control = { province = 1907 data = SOV } } # Baku
		NOT = { local_flag = sov_build_bergsjaeger_1936 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_build_bergsjaeger_1936.ai" }
		command = { type = local_clrflag which = sov_build_panic_1936 }
		command = { type = local_clrflag which = sov_build_land_1936 }
		command = { type = local_clrflag which = sov_build_standard_1936 }
		command = { type = local_clrflag which = sov_build_standard_1948 }
		command = { type = local_setflag which = sov_build_bergsjaeger_1936 }
	}
}
################
# Soviets move against Germany
#	SOVInvadeGER			= Prepare to Invade Germany
#	SOVInvadePOL			= Soviets prepare to invade Poland
#	SOVInvadeBaltic			= Soviets invade Baltic States
#############################################
event = {
	id = 25017
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		day = 3
		NOT = { day = 4 }
		local_flag = SOVInvadeGER
		NOT = { non_aggression = { country = EST country = SOV } }
		NOT = { non_aggression = { country = LIT country = SOV } }
		NOT = { non_aggression = { country = LAT country = SOV } }
		OR = {
			exists = EST
			exists = LIT
			exists = LAT
		}
		OR = {
			AND = {
				local_flag = SOVInvadePOL
				NOT = { exists = POL }
				NOT = {
					alliance = { country = ENG country = EST }
					alliance = { country = ENG country = LIT }
					alliance = { country = ENG country = LAT }
				}
			}
			NOT = {
				alliance = { country = GER country = EST }
				alliance = { country = GER country = LIT }
				alliance = { country = GER country = LAT }
				alliance = { country = ENG country = EST }
				alliance = { country = ENG country = LIT }
				alliance = { country = ENG country = LAT }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai_prepare_war which = EST }
		command = { type = ai_prepare_war which = LIT }
		command = { type = ai_prepare_war which = LAT }
		command = { type = local_setflag which = SOVInvadeBaltic }
	}
}
event = {
	id = 25018
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		day = 5
		NOT = { day = 6 }
		local_flag = SOVInvadeGER
		NOT = { non_aggression = { country = POL country = SOV } }
		NOT = { alliance = { country = ENG country = POL } }
		OR = {
			NOT = { local_flag = SOVInvadeBaltic }
			AND = {
				local_flag = SOVInvadeBaltic
				NOT = {	exists = EST }
				NOT = {	exists = LIT }
				NOT = {	exists = LAT }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai_prepare_war which = POL }
		command = { type = local_setflag which = SOVInvadePOL }
	}
}
event = {
	id = 25019
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		day = 7
		NOT = { day = 8 }
		local_flag = SOVInvadeGER
		land_percentage = { country = GER value = 1.3 }
		NOT = { non_aggression = { country = GER country = SOV } }
		OR = {
			NOT = { local_flag = SOVInvadeBaltic }
			AND = {
				local_flag = SOVInvadeBaltic
				NOT = {	exists = EST }
				NOT = {	exists = LIT }
				NOT = {	exists = LAT }
			}
		}
		OR = {
			AND = {
				NOT = { local_flag = SOVInvadePOL }
				NOT = { alliance = { country = ENG country = POL } }
			}
			AND = {
				local_flag = SOVInvadePOL
				NOT = {	exists = POL }
			}
			AND = {
				local_flag = SOVInvadePOL
				local_flag = SOVInvadeBaltic
				NOT = {	exists = EST }
				NOT = {	exists = LIT }
				NOT = {	exists = LAT }
				NOT = {	exists = POL }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai_prepare_war which = GER }
	}
}
################
# Soviets prep against Baltic States
#############################################
event = { #  (Lithuania)
	id = 25022
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		event = 2018 #Eastern Poland given to the Soviets
		exists = LIT
		NOT = { war = { country = LIT country = SOV } }
		NOT = { non_aggression = { country = LIT country = SOV } }
		NOT = { alliance= { country = LIT country = GER } }
		NOT = { alliance= { country = LIT country = ENG } }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 29 month = june year = 1940 }
	offset = 4
	deathdate = { day = 29 month = august year = 1940 }

	action_a = {
		command = { type = war which = LIT }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
event = { #  (Latvia)
	id = 25023
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		event = 2018 #Eastern Poland given to the Soviets
		exists = LAT
		NOT = { war = { country = LAT country = SOV } }
		NOT = { non_aggression = { country = LAT country = SOV } }
		NOT = { alliance= { country = LAT country = GER } }
		NOT = { alliance= { country = LAT country = ENG } }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 14 month = june year = 1940 }
	offset = 4
	deathdate = { day = 29 month = august year = 1940 }

	action_a = {
		command = { type = war which = LAT }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
event = { #  (Estonia)
	id = 25024
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		random = 30
		event = 2018 #Eastern Poland given to the Soviets
		exists = EST
		NOT = { war = { country = EST country = SOV } }
		NOT = { non_aggression = { country = EST country = SOV } }
		NOT = { alliance= { country = EST country = GER } }
		NOT = { alliance= { country = EST country = ENG } }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 29 month = may year = 1940 }
	offset = 4
	deathdate = { day = 29 month = august year = 1940 }

	action_a = {
		command = { type = war which = EST }
		command = { type = ai which = "Air_Ground.ai" }
	}
}
################
# Soviets react to Finland advancements AI
#############################################
event = {
	id = 25025
	random = no 
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = SOVDefendFIN }
		war = { country = FIN country = SOV }
		OR = {
			AND = { # Winter War settings
				event = 2621 # The Finnish Winter War - Demands rejected
				NOT = {
					event = 2628 # End of the Finnish Winter War - Finns accepts
					control = { province = 142 data = SOV } # Helsinki
					AND = {
						control = { province = 138 data = SOV } # Vaasa
						control = { province = 141 data = SOV } # Turku
						control = { province = 145 data = SOV } # Viipuri
					}
				}
			}
			AND = { # Great Patriotic war setting
				war = { country = GER country = SOV }
				OR = {
#					control = { province = 133 data = FIN } # Murmansk
#					control = { province = 134 data = FIN } # Kola
#					control = { province = 135 data = FIN } # Kandalaksja
#					control = { province = 150 data = FIN } # Kem
#					control = { province = 151 data = FIN } # Segezha
#					control = { province = 152 data = FIN } # Petrozavodsk
					control = { province = 187 data = FIN } # Leningrad
					lost_national = { country = GER value = 10 } # Give up passivity if GER is weak
				}
			}
			AND = { # FIN/SOV war after Winterwar and GER gone/puppeted/allied
				event = 2628 # End of the Finnish Winter War - Finns accepts
				OR = {
					NOT = { exists = GER }
					puppet = { country = GER country = SOV }
					alliance = { country = GER country = SOV }
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Ger_FIN_Attack.ai" }
		command = { type = local_setflag which = SOVDefendFIN }
	}
}
event = {
	id = 25026
	random = no 
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		local_flag = SOVDefendFIN
		OR = {
			NOT = { war = { country = GER country = SOV } }
			AND = {
				land_percentage = { country = GER value = 1.0 }
				year = 1942
			}
		}
		OR = {
			NOT = { war = { country = FIN country = SOV } }
			AND = { # Winter War settings
				war = { country = FIN country = SOV }
				event = 2621 # The Finnish Winter War - Demands rejected
				NOT = { event = 2628 } # End of the Finnish Winter War - Finns accepts
				OR = {
					control = { province = 142 data = SOV } # Helsinki
					AND = {
						control = { province = 138 data = SOV } # Vaasa
						control = { province = 141 data = SOV } # Turku
						control = { province = 145 data = SOV } # Viipuri
					}
				}
			}
			AND = { # Great Patriotic war setting
				war = { country = FIN country = SOV }
				war = { country = GER country = SOV }
#				control = { province = 133 data = SOV } # Murmansk
#				control = { province = 134 data = SOV } # Kola
#				control = { province = 135 data = SOV } # Kandalaksja
#				control = { province = 150 data = SOV } # Kem
#				control = { province = 151 data = SOV } # Segezha
#				control = { province = 152 data = SOV } # Petrozavodsk
				control = { province = 187 data = SOV } # Leningrad
				NOT = { lost_national = { country = GER value = 10 } } # Block passivity if GER is weak
			}
			AND = { # FIN/SOV war after Winterwar and GER gone/puppeted/allied
				war = { country = FIN country = SOV }
				event = 2628 # End of the Finnish Winter War - Finns accepts
				NOT = { 
					war = { country = GER country = SOV }
					puppet = { country = GER country = SOV }
					alliance = { country = GER country = SOV }
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Ger_FIN_Defend.ai" }
		command = { type = local_clrflag which = SOVDefendFIN }
	}
}
################
# Soviets Handicap againt Germany AI
#############################################
#event = {
#	id = 25027
#	random = no 
#	country = SOV
#	
#	trigger = {
#		ai = yes
#		ai = GER
#		event = 20007 # German AI DOWing of SOV
#		NOT = { local_flag = SOVHandicapGER }
#		war = { country = GER country = SOV }
#		NOT = { war = { country = JAP country = SOV } }
#		NOT = { war = { country = CHI country = SOV } }
#		OR = {
#			NOT = { war = { country = TUR country = SOV } }
#			AND = {
#				ai = TUR
#				war = { country = TUR country = SOV }
#			}
#		}
#		month = 4
#		NOT = { month = 8 }
#	}
#
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = ai which = "switch/SOV_GER_Handicap.ai" }
#		command = { type = local_setflag which = SOVHandicapGER }
#	}
#}
#event = {
#	id = 25028
#	random = no 
#	country = SOV
#	
#	trigger = {
#		ai = yes
#		local_flag = SOVHandicapGER
#		OR = {
#			month = 11
#			lost_national = { country = SOV value = 25 }
#			war = { country = JAP country = SOV }
#			war = { country = CHI country = SOV }
#			AND = {
#				NOT = { ai = TUR }
#				war = { country = TUR country = SOV }
#			}
#		}
#	}
#
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = ai which = "switch/SOV_GER_Handicap_Remove.ai" }
#		command = { type = local_clrflag which = SOVHandicapGER }
#	}
#}
################
# Soviets fortify their country
#############################################
event = {
	id = 25029
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		#atwar = no
		technology = 5100
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1939 }
	offset = 3
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/SOV_Build_Fort.ai" }
	}
}
################################################################
###Soviets Move Capital
################################################################
event = {
	id = 25030
	random = no
	country = SOV

	trigger = {
		ai = yes
		atwar = yes
		control = { province = 168 data = SOV } # Gorki
		OR = { 
			NOT  = { control = { province = 175 data = SOV } } # Moscow
			AND = {
				NOT  = { control = { province = 288 data = SOV } }
				NOT  = { control = { province = 182 data = SOV } }
				NOT  = { control = { province = 94 data = SOV } }
				NOT  = { control = { province = 176 data = SOV } }
				NOT  = { control = { province = 174 data = SOV } }
			}
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1999 }

	action_a = { 
		command = { type = capital which = 168 }
	}
}
event = {
	id = 25031
	random = no
	country = SOV

	trigger = {
		ai = yes
		atwar = yes
		event = 25030
		control = { province = 1572 data = SOV } # Swerdlovsk
		OR = { 
			NOT  = { control = { province = 167 data = SOV } }
			NOT  = { control = { province = 168 data = SOV } }
			NOT  = { control = { province = 169 data = SOV } }
			NOT  = { control = { province = 1777 data = SOV } }
			NOT  = { control = { province = 1776 data = SOV } }
			NOT  = { control = { province = 166 data = SOV } }
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1999 }

	action_a = { 
		command = { type = capital which = 1572 } # Swerdlovsk
		command = { type = sleepevent which = 25030 }		
	}
}
event = {
	id = 25032
	random = no
	country = SOV

	trigger = {
		ai = yes
		atwar = yes
		OR = {
			event = 25030
			event = 25031
		}
		control = { province = 167 data = SOV }
		control = { province = 168 data = SOV }
		control = { province = 169 data = SOV }
		control = { province = 1777 data = SOV }
		control = { province = 1776 data = SOV }
		control = { province = 166 data = SOV }
		control = { province = 175 data = SOV }
		control = { province = 288 data = SOV }
		control = { province = 182 data = SOV }
		control = { province = 94 data = SOV }
		control = { province = 176 data = SOV }
		control = { province = 174 data = SOV }
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1999 }

	action_a = { 
		command = { type = capital which = 175 }
	}
}
################
# Soviet cancel non-aggression pact with Germany AI
#############################################
event = {
	id = 25033
	random = no 
	country = SOV
	
	trigger = {
		ai = yes
		non_aggression = { country = GER country = SOV }
		NOT = { war = { country = GER country = SOV } }
		OR = {
			local_flag = SOVInvadeGER
			war = { country = GER country = SOV }
			AND = {
				NOT = { war = { country = GER country = SOV } }
				year = 1942
				atwar = GER
			}
			AND = {
				NOT = { flag = MolotovPact }
				NOT = { event = 2013 } # Molotov Pact Historical
				NOT = { event = 2015 } # Molotov Pact Alliance
				NOT = { event = 2016 } # Molotov Pact Limited
				OR = {
					control = { province = 485 data = GER } # Warsaw
					war = { country = GER country = POL }
					war = { country = GER country = FRA }
					war = { country = GER country = ENG }
					puppet = { country = POL country = GER }
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 12
	deathdate = { day = 29 month = december year = 1939 }

	action_a = {
		command = { type = end_non_aggression which = SOV where = GER }
	}
}
################
# Soviet AI Slider manipulation
#
#	Free Market
#############################################
event = { # Free Market
	id = 25034
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = free_market value = 1}
		government = democratic
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = free_market value = 1 }
	}
}
event = { # Free Market
	id = 25035
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = free_market value = -1}
		OR = {
			government = fascist
			government = communist
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = free_market value = -1 }
	}
}
################
#	Standing Army
#############################################
event = { # Standing Army
	id = 25036
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = professional_army value = 1}
		AND = {
			#NOT = { domestic = { type = professional_army value = 9 } }
			OR = {
				technology = 6220 # Spearhead Doctrine
				AND = {
					technology = 6300 # Human Wave Doctrine
					OR = {
						ideology = nazi
						ideology = fascist
						ideology = leninist
						ideology = stalinist
					}
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = professional_army value = 1 }
	}
}
event = { # Standing Army
	id = 25037
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = professional_army value = -1}
		AND = {
			domestic = { type = professional_army value = 0 }
			OR = {
				technology = 6020 # Superior Firepower Doctrine
				technology = 6030 # Grand Battleplan Doctrine
				AND = {
					technology = 6300 # Human Wave Doctrine
					NOT = {
						ideology = nazi
						ideology = fascist
						ideology = leninist
						ideology = stalinist
					}
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = professional_army value = -1 }
	}
}
################
#	Hawk Lobby
#############################################
event = { # Hawk Lobby
	id = 25038
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = defense_lobby value = 1}
		AND = {
			#NOT = { domestic = { type = defense_lobby value = 9 } }
			OR = {
				ideology = nazi
				ideology = fascist
				ideology = leninist
				ideology = stalinist
				atwar = yes
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = defense_lobby value = 1 }
	}
}
event = { # Hawk Lobby
	id = 25039
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = defense_lobby value = -1}
		AND = {
			#domestic = { type = defense_lobby value = 0 }
			NOT = {
				ideology = nazi
				ideology = fascist
				ideology = leninist
				ideology = stalinist
			}	
			atwar = no
			NOT = { year = 1940 }
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = defense_lobby value = -1 }
	}
}
################
#	Interventionism
#############################################
event = { # Interventionism
	id = 25040
	random = no
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = interventionism value = 1}
		OR = {
			atwar = yes
			AND = {
				#NOT = { domestic = { type = interventionism value = 9 } }
				OR = {
					ideology = nazi
					ideology = fascist
					ideology = leninist
					ideology = stalinist
				}
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = interventionism value = 1 }
	}
}
################
# Soviets turn DOWing off
#############################################
event = { 
	id = 25041
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		lost_national = { country = SOV value = 1 }
		NOT = { local_flag = SOV_DOW }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = local_setflag which = SOV_DOW }
		command = { type = ai which = "switch/SOV_DOW_OFF.ai" }
	}
}
event = { 
	id = 25042
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { lost_national = { country = SOV value = 1 } }
		local_flag = SOV_DOW
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = local_clrflag which = SOV_DOW }
		command = { type = ai which = "switch/SOV_DOW_ON.ai" }
	}
}

################
# Surprise attack events by Pang Bingxun
#############################################
#
#event = {
#	id = 25045
#	random = no
#	country = SOV
#
#	trigger = {
#		ai = yes
#		event = 20007 # Barbarossa started
#		event = 2652 # second gpw-event
#	}
#
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	name = "AI_EVENT"
#	style = 0
#
#	action_a = {
#		command = { type = intelligence which = them value = 30 } # -(1937+1939 Encryption)
#		command = { type = intelligence which = us value = -50 } # -(1938+1940 Decryption)
#		command = { type = army_detection which = them value = 30 } # -(1937+1939 Encryption)
#		command = { type = army_detection which = us value = -30 } # -(1938+1940 Decryption)
#		command = { type = surprise which = naval value = -60 } # -(1937-1940 Cryption techs)
#		command = { type = surprise which = land value = -60 } # -(1937-1940 Cryption techs)
#		command = { type = surprise which = air value = -60 } # -(1937-1940 Cryption techs)
#		command = { type = tc_mod value = -20 } # -(1936+1940 Logistics)
#		command = { type = supply_dist_mod value = -10 } # -(1936+1940 Logistics)
#	}
#}
#
#event = {
#	id = 25046
#	random = no
#	country = SOV
#
#	trigger = {
#		ai = yes
#		event = 25554
#		event = 2653 # third gpw-event
#	}
#
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	name = "AI_EVENT"
#	style = 0
#
#	action_a = {
#		command = { type = intelligence which = them value = -30 } # +(1937+1939 Encryption)
#		command = { type = intelligence which = us value = 50 } # +(1938+1940 Decryption)
#		command = { type = army_detection which = them value = -30 } # +(1937+1939 Encryption)
#		command = { type = army_detection which = us value = 30 } # +(1938+1940 Decryption)
#		command = { type = surprise which = naval value = 60 } # +(1937-1940 Cryption techs)
#		command = { type = surprise which = land value = 60 } # +(1937-1940 Cryption techs)
#		command = { type = surprise which = air value = 60 } # +(1937-1940 Cryption techs)
#		command = { type = tc_mod value = 20 } # +(1936+1940 Logistics)
#		command = { type = supply_dist_mod value = 10 } # +(1936+1940 Logistics)
#	}
#}
#
################
# Soviet upgrading and reinforcing of units
#############################################
event = {
	id = 25020
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = Upgrading_000 }
		atwar = no
		NOT = { technology = 1030 } # 1939 Inf
		NOT = { year = 1940 }
		OR = {
			NOT = { year = 1939 }
			NOT = { month = 4 } # may 
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/Upgrading_000.ai" }
		command = { type = local_setflag which = Upgrading_000 }
		command = { type = local_clrflag which = Upgrading_035 }
	}
}

event = {
	id = 25021
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = Upgrading_035 }
		OR = {
			atwar = yes
			technology = 1030 # 1939 Inf
			year = 1940
			AND = {
				year = 1939
				month = 4 # may
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/Upgrading_035.ai" }
		command = { type = local_clrflag which = Upgrading_000 }
		command = { type = local_setflag which = Upgrading_035 }
	}
}

event = {
	id = 25045
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_000 }
		atwar = no
		NOT = { ic = 300 }
		NOT = { year = 1939 }
		OR = {
			NOT = { year = 1938 }
			NOT = { month = 8 } # september
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = april year = 1939 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_000.ai" }
		command = { type = local_setflag which = reinforcement_000 }
		command = { type = local_clrflag which = reinforcement_020 }
		command = { type = local_clrflag which = reinforcement_050 }
	}
}

event = {
	id = 25046
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_050 }
		OR = {
			atwar = yes
			ic = 300 # Donnot disturb Infra production
			year = 1939
			AND = {
				year = 1938
				month = 8 # september
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = april year = 1939 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_050.ai" }
		command = { type = local_clrflag which = reinforcement_000 }
		command = { type = local_clrflag which = reinforcement_020 }
		command = { type = local_setflag which = reinforcement_050 }
	}
}

################
# Reinforcements balance events by Pang Bingxun
#############################################

event = { 
	id = 25047
	random = no 
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_020 }
		NOT = { manpower = 1 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = may year = 1939 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_020.ai" }
		command = { type = local_clrflag which = reinforcement_000 }
		command = { type = local_setflag which = reinforcement_020 }
		command = { type = local_clrflag which = reinforcement_050 }
	}
}

event = { 
	id = 25048
	random = no 
	country = SOV
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_050 }
		manpower = 3
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = may year = 1939 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_050.ai" }
		command = { type = local_clrflag which = reinforcement_000 }
		command = { type = local_clrflag which = reinforcement_020 }
		command = { type = local_setflag which = reinforcement_050 }
	}
}

################
# Build rocket site
#############################################

event = { 
	id = 25049
	random = no 
	country = SOV

	trigger = {
		ai = yes
		year = 1938
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = june year = 1938 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/sov_rocket_test.ai" }
	}
}

################
# Resource transfer events by Pang Bingxun
#############################################

event = {
	id = 25051
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = SovietNotLowOnEnergy }
		energy = 6000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = SovietNotLowOnEnergy }
	}
}

event = {
	id = 25052
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		flag = SovietNotLowOnEnergy
		NOT = { energy = 5000 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = SovietNotLowOnEnergy }
	}
}

event = {
	id = 25053
	random = no 
	country = SOV
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = energypool value = -60 }
		command = { type = supplies value = 15 } # 60 x 1 / 6 x 1.5
	}
}

event = {
	id = 25054
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = SovietNotLowOnMetal }
		metal = 4000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = SovietNotLowOnMetal }
	}
}

event = {
	id = 25055
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		flag = SovietNotLowOnMetal
		NOT = { metal = 3000 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = SovietNotLowOnMetal }
	}
}

event = {
	id = 25056
	random = no 
	country = SOV
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = metalpool value = -60 }
		command = { type = supplies value = 30 } # 60 x 2 / 6 x 1.5
	}
}

event = {
	id = 25057
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = SovietNotLowOnRares }
		rare_materials = 2000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = SovietNotLowOnRares }
	}
}

event = {
	id = 25058
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		flag = SovietNotLowOnRares
		NOT = { rare_materials = 1500 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = SovietNotLowOnRares }
	}
}

event = {
	id = 25059
	random = no 
	country = SOV
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = rarematerialspool value = -60 }
		command = { type = supplies value = 60 } # 60 x 4 / 6 x 1.5
	}
}

event = {
	id = 25060
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = SovietNotLowOnOil }
		oil = 9000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = SovietNotLowOnOil }
	}
}

event = {
	id = 25061
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		flag = SovietNotLowOnOil
		NOT = { oil = 8000 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = SovietNotLowOnOil }
	}
}

event = {
	id = 25062
	random = no 
	country = SOV
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = oilpool value = -60 }
		command = { type = supplies value = 45 } # 60 x 3 / 6 x 1.5
	}
}

event = {
	id = 25063
	random = no 
	country = MON
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnEnergy
		puppet = { country = MON country = SOV } 
		NOT = { energy = 600 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 25053 }
	}
}

event = {
	id = 25064
	random = no 
	country = MON
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnMetal
		puppet = { country = MON country = SOV } 
		NOT = { metal = 400 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 25056 }
	}
}

event = {
	id = 25065
	random = no 
	country = MON
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		puppet = { country = MON country = SOV } 
		NOT = { rare_materials = 200 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 25059 }
	}
}

event = {
	id = 25066
	random = no 
	country = MON
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		puppet = { country = MON country = SOV } 
		NOT = { oil = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 25062 }
	}
}

event = {
	id = 25067
	random = no 
	country = TAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnEnergy
		OR = {
			alliance = { country = TAN country = SOV } 
			atwar = no
		}
		NOT = { energy = 600 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 25053 }
	}
}

event = {
	id = 25068
	random = no 
	country = TAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnMetal
		OR = {
			alliance = { country = TAN country = SOV } 
			atwar = no
		}
		NOT = { metal = 400 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 25056 }
	}
}

event = {
	id = 25069
	random = no 
	country = TAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		OR = {
			alliance = { country = TAN country = SOV } 
			atwar = no
		}
		NOT = { rare_materials = 200 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 25059 }
	}
}

event = {
	id = 25070
	random = no 
	country = TAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		OR = {
			alliance = { country = TAN country = SOV } 
			atwar = no
		}
		NOT = { oil = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 25062 }
	}
}

event = {
	id = 25071
	random = no 
	country = AFG
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnEnergy
		OR = {
			alliance = { country = AFG country = SOV } 
			atwar = no
		}
		NOT = { energy = 600 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 25053 }
	}
}

event = {
	id = 25072
	random = no 
	country = AFG
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnMetal
		OR = {
			alliance = { country = AFG country = SOV } 
			atwar = no
		}
		NOT = { metal = 400 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 25056 }
	}
}

event = {
	id = 25073
	random = no 
	country = AFG
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		OR = {
			alliance = { country = AFG country = SOV } 
			atwar = no
		}
		NOT = { rare_materials = 200 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 25059 }
	}
}

event = {
	id = 25074
	random = no 
	country = AFG
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		OR = {
			alliance = { country = AFG country = SOV } 
			atwar = no
		}
		NOT = { oil = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 25062 }
	}
}

event = {
	id = 25075
	random = no 
	country = PER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnEnergy
		OR = {
			alliance = { country = PER country = SOV } 
			atwar = no
		}
		NOT = { energy = 600 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 25053 }
	}
}

event = {
	id = 25076
	random = no 
	country = PER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnMetal
		OR = {
			alliance = { country = PER country = SOV } 
			atwar = no
		}
		NOT = { metal = 400 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 25056 }
	}
}

event = {
	id = 25077
	random = no 
	country = PER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		OR = {
			alliance = { country = PER country = SOV } 
			atwar = no
		}
		NOT = { rare_materials = 200 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 25059 }
	}
}

event = {
	id = 25078
	random = no 
	country = PER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		OR = {
			alliance = { country = PER country = SOV } 
			atwar = no
		}
		NOT = { oil = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 25062 }
	}
}

event = {
	id = 25079
	random = no 
	country = TUR
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnEnergy
		OR = {
			alliance = { country = TUR country = SOV } 
			atwar = no
		}
		NOT = { energy = 600 }
		supplies = 200 # 50 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 25053 }
	}
}

event = {
	id = 25080
	random = no 
	country = TUR
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnMetal
		OR = {
			alliance = { country = TUR country = SOV } 
			atwar = no
		}
		NOT = { metal = 400 }
		supplies = 200 # 50 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 25056 }
	}
}

event = {
	id = 25081
	random = no 
	country = TUR
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		OR = {
			alliance = { country = TUR country = SOV } 
			atwar = no
		}
		NOT = { rare_materials = 200 }
		supplies = 200 # 50 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 25059 }
	}
}

event = {
	id = 25082
	random = no 
	country = TUR
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		OR = {
			alliance = { country = TUR country = SOV } 
			atwar = no
		}
		NOT = { oil = 500 }
		supplies = 200 # 50 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 25062 }
	}
}

event = {
	id = 25083
	random = no 
	country = GER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnRares
		NOT = { war = { country = GER country = SOV } }
		metal = 1200 
		OR = {
			NOT = { rare_materials = 600 }
			AND = {
				NOT = { rare_materials = 1200 }
				year = 1937
			}
			AND = {
				NOT = { rare_materials = 2400 }
				year = 1938
			}
			AND = {
				NOT = { rare_materials = 6000 }
				year = 1939
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 100 }
		command = { type = metalpool value = -200 }
		command = { type = trigger which = 25084 }
	}
}

event = {
	id = 25084
	random = no 
	country = SOV
	persistent = yes
	# triggered by 25083
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = rarematerialspool value = -100 }
		command = { type = metalpool value = 200 }
	}
}

event = {
	id = 25085
	random = no 
	country = GER
	persistent = yes
	
	trigger = {
		ai = yes
		ai = SOV
		flag = SovietNotLowOnOil
		NOT = { war = { country = GER country = SOV } }
		energy = 3000
		OR = {
			NOT = { oil = 100 } # Ample oil early due to initial trade
			AND = {
				NOT = { oil = 30000 }
				year = 1939
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 100 }
		command = { type = energypool value = -300 }
		command = { type = trigger which = 25086 }
	}
}

event = {
	id = 25086
	random = no 
	country = SOV
	persistent = yes
	# triggered by 25085
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = oilpool value = -100 }
		command = { type = energypool value = 300 }
	}
}

################
# build V2 for nuclear strike
#############################################
event = {
	id = 25089
	random = no
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		technology = 16010 # 1948 Miniaturized Fission Bomb
		technology = 7120 # 1944 Ballistic Missile
		day = 0 # First day of the month
		NOT = { day = 1 } # Not day 2 to 30 of a month
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = build_division which = flying_rocket }
	}
}

################
# The AI must keep reserves of manpower
#############################################
#
#event = {
#	id = 25049
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		NOT = { local_flag = Reserve150 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve150 }
#	}
#}
#
#event = {
#	id = 25050
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve150
#		NOT = { local_flag = Reserve300 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve300 }
#	}
#}
#
#event = {
#	id = 25051
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve300
#		NOT = { local_flag = Reserve450 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve450 }
#	}
#}
#
#event = {
#	id = 25052
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve450
#		NOT = { local_flag = Reserve600 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve600 }
#	}
#}
#
#event = {
#	id = 25053
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve600
#		NOT = { local_flag = Reserve750 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve750 }
#	}
#}
#
#event = {
#	id = 25054
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve750
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve750 }
#	}
#}
#
#event = {
#	id = 25055
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve600
#		NOT = { local_flag = Reserve750 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve600 }
#	}
#}
#
#event = {
#	id = 25056
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve450
#		NOT = { local_flag = Reserve600 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve450 }
#	}
#}
#
#event = {
#	id = 25057
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve300
#		NOT = { local_flag = Reserve450 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve300 }
#	}
#}
#
#event = {
#	id = 25058
#	random = no
#	country = SOV
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve150
#		NOT = { local_flag = Reserve300 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve150 }
#	}
#}
#
####################################
# Soviet 25500 - 25599 = Minister Change Events
####################################
################
# Minister of Security Section 25500 - 25509
#############################################
event = { # Sergej Uritskiy takes power
	id = 25500
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4040 # Sergej Uritskiy
		NOT = { InCabinet = 4040 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 4040 }
		command = { type = dissent value = -1 }
	}
}
event = { # Nikolai Yezhov takes power
	id = 25501
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4039 # Nikolai Yezhov
		NOT = { InCabinet = 4039 }
		NOT = { minister = 4040 } # Sergej Uritskiy
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 4039 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 25510 - 25519
#############################################
event = { # Boris M. Shaposhnikov takes power
	id = 25510
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4051 # Boris M. Shaposhnikov
		NOT = { InCabinet = 4051 }
		OR = {
			atwar = no
			NOT = { manpower = 200 }
			NOT = { minister = 4052 } # Kirill A. Meretskov
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 4051 }
		command = { type = dissent value = -1 }
	}
}
event = { # Kirill A. Meretskov takes power
	id = 25511
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4052 # Kirill A. Meretskov
		NOT = { InCabinet = 4052 }
		OR = {
			AND = {
				atwar = yes
				manpower = 200
			}
			NOT = { minister = 4051 } # Boris M. Shaposhnikov
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 4052 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 25520 - 25529
#############################################
event = { # Igor I. Ilichev takes power
	id = 25520
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4049 # Igor I. Ilichev
		NOT = { InCabinet = 4049 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofintelligence which = 4049 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of the Army Section 25530 - 25539
#############################################
event = { # Iosif V. Stalin takes power
	id = 25530
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		minister = 4059 # Iosif V. Stalin
		NOT = { InCabinet = 4059 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 4059 }
		command = { type = dissent value = -1 }
	}
}
event = { # Semen K. Timoshenko takes power
	id = 25531
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 4058 # Semen K. Timoshenko
		NOT = { InCabinet = 4058 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 4058 }
		command = { type = dissent value = -1 }
	}
}
################
# Armament Minister Section 25540 - 25549
#############################################
event = { # Lazer Kaganovich takes power
	id = 25540
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		minister = 4004 # Lazer Kaganovich
		NOT = { InCabinet = 4004 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 4004 }
		command = { type = dissent value = -1 }
	}
}
event = { # Nikolaj Bulganin takes power
	id = 25541
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		minister = 4071 # Nikolaj Bulganin
		NOT = { InCabinet = 4071 }
		NOT = { minister = 4004 } # Lazer Kaganovich
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 4071 }
		command = { type = dissent value = -1 }
	}
}
event = { # Iosif V. Stalin takes power
	id = 25542
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 4073 # Iosif V. Stalin
		NOT = { InCabinet = 4073 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 4073 }
		command = { type = dissent value = -1 }
	}
}

################
# Chief of Air Minister Section 25550 - 25559
#############################################
event = { # Yakov I. Alksnis takes power
	id = 25550
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4010 # Yakov I. Alksnis
		NOT = { InCabinet = 4010 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 4010 }
		command = { type = dissent value = -1 }
	}
}
event = { # Aleksandr D. Loktionov takes power
	id = 25551
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 4064 # Aleksandr D. Loktionov
		NOT = { InCabinet = 4064 }
		NOT = { minister = 4010 } # Yakov I. Alksnis
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 4064 }
		command = { type = dissent value = -1 }
	}
}
#############################################
event = {
	id = 91312
	random = no 
	country = SOV
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		NOT = { exists = GER }
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1945 }
	offset = 10
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "SOV_beke.ai" }
	}
}
